Historically, time-based block diagram models have been used to study, design, debug, and refine dynamic systems representative of many real-world systems. A dynamic system (either natural or man-made) is a system whose response at any given time is a function of its input stimuli, its current state, and the current time. Many systems can be represented by models that are based on difference or differential equations. Often, these models are formulated as a state space representation, where the state captures how the model responds to a given input. These systems can be physical such as cell phones, automobiles, automobile subsystems (e.g., a power window system), airplanes, washers, etc., but also conceptual such as, for example, the stock market. Models based on difference equations and differential equations exhibit behaviors as state changes that are related to time as an independent variable. Another approach to modeling is the use of discrete state based models such as state transition diagrams and Petri nets which can often be represented as finite state machines. Such discrete state based models exhibit behaviors as sequences of state changes that are not necessarily related to time as an independent variable. In both cases, an implicit or explicit function may provide the next state of the model, given the current state and input. In case of differential equations, this function may include numerical integration algorithms that discretize time according to a fixed or variable time step. Likewise, an implicit or explicit function may provide the output of the model, given the current state and input. Generating the behavior of a model given its initial state and input is referred to as executing or simulating the model.
Models may be used as a basis for generating code and/or applications to be executed on a specific target platform. When the code being generated from the model is for a real-time application, data acquisition and logging may be important for monitoring the effectiveness of the application. A model that is designed in its entirety or in part for the purpose of real-time operation in some form, either directly, by means of code generation, or in another incarnation is referred to as a real-time model. Data acquisition refers to acquiring data from an application such as, for example, information about computed values of a real-time application implemented in software. Data logging refers to the storage of data (e.g., internal states of the real-time application) such as for monitoring by a human or storage for future processing and analysis. This storage operation may occur repeatedly, for example based on a time period (periodic data logging), based on an event (event based data logging), or based on a combination of the two. Time-based and event-based logging may be implemented according to one or more algorithms. For example, the algorithm(s) may be used to store data, to identify when to log data, to identify a time interval in which to log data for, to indicate whether the data logging is periodic (time-based) or event-based, etc.